#ifndef GT_DISPLAY_H
#define GT_DISPLAY_H

#include "config.h"
#include "isearch.h"

struct display_t {
  int index;
  int cursor;
  int ncurses_initialized;
};

display_t *creare_display();
void start_ncurses(display_t *display, configuration_t *config);
void stop_ncurses(display_t *display);
void display_results(display_t *display, search_t *search,
                     int terminal_line_nb);
void resize_display(display_t *display, search_t *search, int terminal_line_nb);
void move_cursor_up_and_refresh(display_t *display, search_t *search);
void move_cursor_down_and_refresh(display_t *display, search_t *search);
void move_page_up_and_refresh(display_t *display, search_t *search);
void move_page_down_and_refresh(display_t *display, search_t *search);

void move_cursor_up(display_t *display, search_t *search, int terminal_line_nb);
void move_cursor_down(display_t *display, search_t *search,
                      int terminal_line_nb);

void move_page_up(display_t *display, search_t *search, int terminal_line_nb);
void move_page_down(display_t *display, search_t *search, int terminal_line_nb);

void free_display(display_t *display);

#endif // header file protect
       // ok